home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / lwbrk / nsISemanticUnitScanner.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  5KB  |  131 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsISemanticUnitScanner.idl
  3.  */
  4.  
  5. #ifndef __gen_nsISemanticUnitScanner_h__
  6. #define __gen_nsISemanticUnitScanner_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. // {ADF42751-1CEF-4ad2-AA8E-BCB849D8D31F}
  18. #define NS_SEMANTICUNITSCANNER_CID { 0xadf42751, 0x1cef, 0x4ad2, { 0xaa, 0x8e, 0xbc, 0xb8, 0x49, 0xd8, 0xd3, 0x1f}}
  19. #define NS_SEMANTICUNITSCANNER_CONTRACTID "@mozilla.org/intl/semanticunitscanner;1"
  20.  
  21. /* starting interface:    nsISemanticUnitScanner */
  22. #define NS_ISEMANTICUNITSCANNER_IID_STR "9f620be4-e535-11d6-b254-00039310a47a"
  23.  
  24. #define NS_ISEMANTICUNITSCANNER_IID \
  25.   {0x9f620be4, 0xe535, 0x11d6, \
  26.     { 0xb2, 0x54, 0x00, 0x03, 0x93, 0x10, 0xa4, 0x7a }}
  27.  
  28. /**
  29.  * Provides a language independent way to break UNICODE
  30.  * text into meaningful semantic units (e.g. words).
  31.  */
  32. class NS_NO_VTABLE nsISemanticUnitScanner : public nsISupports {
  33.  public: 
  34.  
  35.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISEMANTICUNITSCANNER_IID)
  36.  
  37.   /**
  38.      * start()
  39.      *
  40.      * Starts up the semantic unit scanner with an optional
  41.      * character set, which acts as a hint to optimize the heuristics
  42.      * used to determine the language(s) of the processed text.
  43.      *
  44.      * @param characterSet the character set the text was originally
  45.      *                     encoded in (can be NULL)
  46.      */
  47.   /* void start (in string characterSet); */
  48.   NS_IMETHOD Start(const char *characterSet) = 0;
  49.  
  50.   /**
  51.      * next()
  52.      * Get the begin / end offset of the next unit in the current text
  53.      *
  54.      * @param text the text to be scanned
  55.      * @param length the number of characters in the text to be processed
  56.      * @param pos the current position
  57.      * @param isLastBuffer, the buffer is the last one
  58.      * @param begin the begin offset of the next unit 
  59.      * @param begin the end offset of the next unit 
  60.      * @return has more unit in the current text
  61.      */
  62.   /* boolean next (in wstring text, in long length, in long pos, in boolean isLastBuffer, out long begin, out long end); */
  63.   NS_IMETHOD Next(const PRUnichar *text, PRInt32 length, PRInt32 pos, PRBool isLastBuffer, PRInt32 *begin, PRInt32 *end, PRBool *_retval) = 0;
  64.  
  65. };
  66.  
  67. /* Use this macro when declaring classes that implement this interface. */
  68. #define NS_DECL_NSISEMANTICUNITSCANNER \
  69.   NS_IMETHOD Start(const char *characterSet); \
  70.   NS_IMETHOD Next(const PRUnichar *text, PRInt32 length, PRInt32 pos, PRBool isLastBuffer, PRInt32 *begin, PRInt32 *end, PRBool *_retval); 
  71.  
  72. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  73. #define NS_FORWARD_NSISEMANTICUNITSCANNER(_to) \
  74.   NS_IMETHOD Start(const char *characterSet) { return _to Start(characterSet); } \
  75.   NS_IMETHOD Next(const PRUnichar *text, PRInt32 length, PRInt32 pos, PRBool isLastBuffer, PRInt32 *begin, PRInt32 *end, PRBool *_retval) { return _to Next(text, length, pos, isLastBuffer, begin, end, _retval); } 
  76.  
  77. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  78. #define NS_FORWARD_SAFE_NSISEMANTICUNITSCANNER(_to) \
  79.   NS_IMETHOD Start(const char *characterSet) { return !_to ? NS_ERROR_NULL_POINTER : _to->Start(characterSet); } \
  80.   NS_IMETHOD Next(const PRUnichar *text, PRInt32 length, PRInt32 pos, PRBool isLastBuffer, PRInt32 *begin, PRInt32 *end, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Next(text, length, pos, isLastBuffer, begin, end, _retval); } 
  81.  
  82. #if 0
  83. /* Use the code below as a template for the implementation class for this interface. */
  84.  
  85. /* Header file */
  86. class nsSemanticUnitScanner : public nsISemanticUnitScanner
  87. {
  88. public:
  89.   NS_DECL_ISUPPORTS
  90.   NS_DECL_NSISEMANTICUNITSCANNER
  91.  
  92.   nsSemanticUnitScanner();
  93.  
  94. private:
  95.   ~nsSemanticUnitScanner();
  96.  
  97. protected:
  98.   /* additional members */
  99. };
  100.  
  101. /* Implementation file */
  102. NS_IMPL_ISUPPORTS1(nsSemanticUnitScanner, nsISemanticUnitScanner)
  103.  
  104. nsSemanticUnitScanner::nsSemanticUnitScanner()
  105. {
  106.   /* member initializers and constructor code */
  107. }
  108.  
  109. nsSemanticUnitScanner::~nsSemanticUnitScanner()
  110. {
  111.   /* destructor code */
  112. }
  113.  
  114. /* void start (in string characterSet); */
  115. NS_IMETHODIMP nsSemanticUnitScanner::Start(const char *characterSet)
  116. {
  117.     return NS_ERROR_NOT_IMPLEMENTED;
  118. }
  119.  
  120. /* boolean next (in wstring text, in long length, in long pos, in boolean isLastBuffer, out long begin, out long end); */
  121. NS_IMETHODIMP nsSemanticUnitScanner::Next(const PRUnichar *text, PRInt32 length, PRInt32 pos, PRBool isLastBuffer, PRInt32 *begin, PRInt32 *end, PRBool *_retval)
  122. {
  123.     return NS_ERROR_NOT_IMPLEMENTED;
  124. }
  125.  
  126. /* End of implementation class template. */
  127. #endif
  128.  
  129.  
  130. #endif /* __gen_nsISemanticUnitScanner_h__ */
  131.